import { request } from '../utils/request';
import type { ApiResponse } from '../types/common';
import type {
  GraphNeo4jParams,
  RetreiveGraphNeo4jParams,
  GraphNeo4jResponse,
} from '../types/tech-insight';

// API 请求方法
export const techInsightApi = {
  // 获取技术洞察图谱
  getGraphNeo4j(params: GraphNeo4jParams) {
    return request.get<any, ApiResponse<GraphNeo4jResponse>>(
      '/graphNeo4j/get/',
      { params }
    );
  },

  // 获取特定文档图谱
  retreiveGraphNeo4j(params: RetreiveGraphNeo4jParams) {
    return request.get<any, ApiResponse<GraphNeo4jResponse>>(
      '/graphNeo4j/retreive/',
      { params }
    );
  },
};